# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-mahjongg
pkgver=3.38.3
pkgrel=1
pkgdesc="Disassemble a pile of tiles by removing matching pairs"
url="https://wiki.gnome.org/Apps/Mahjongg"
arch=(x86_64)
license=(GPL)
depends=(gtk3 librsvg)
makedepends=(meson gobject-introspection yelp-tools appstream-glib git vala)
groups=(gnome-extra)
_commit=2214a09cdc2def8be5ae669a92aa31550e9f7cb4  # tags/3.38.3^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-mahjongg.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build \
    -D compile-schemas=disabled \
    -D update-icon-cache=disabled
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
